package com.example.his.api.mis.service.impl;

import com.example.his.api.db.dao.OrderDao;
import com.example.his.api.db.dao.UserDao;
import com.example.his.api.mis.service.CustomerService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;

@Service("MisCustomerServiceImpl")
public class CustomerServiceImpl implements CustomerService {
  @Resource
  private UserDao userDao;
  
  @Resource
  private OrderDao orderDao;
  
  
  @Override
  public HashMap searchSummary(int id) {
    HashMap userInfo = userDao.searchById(id);
    HashMap map = orderDao.searchFrontStatistic(id);
    map.putAll(userInfo);
    return map;
  }
}
